Skip to content

Support input event system call #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Support input event system call #1

merged 1 commit into from
Aug 9, 2022

Conversation

alanjian85
Copy link
Collaborator

This PR adds the support for the new event system introduced in sysprog21/rv32emu@0d56bf0, by invoking system call poll_event to accept input specific events, we can now move the character and control the menu with the keyboard, adjust the view angle with the mouse in relative mode and shoot with the left mouse button.

@jserv jserv changed the title Add the suppport for input event specific system calls Support input event system call Aug 9, 2022
Copy link

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent file port/boards/rv32emu/main.c with tabs for consistent style.

@jserv
Copy link

jserv commented Aug 9, 2022

Shall we map more keys to make it playable? See https://github.com/id-Software/Quake/blob/master/WinQuake/keys.c

@alanjian85
Copy link
Collaborator Author

Shall we map more keys to make it playable? See https://github.com/id-Software/Quake/blob/master/WinQuake/keys.c

Sure. I found that the mouse wheel should also be supported when I played vkQuake, modifications to rv32emu should be made.

@jserv
Copy link

jserv commented Aug 9, 2022

I found that the mouse wheel should also be supported when I played vkQuake, modifications to rv32emu should be made.

Once you are about to send a pull request containing RV32 ELF executable, add a quick note docs/demo.md for rv32emu. It should describe general key/mouse operation and some limitations.

This commit adds the support for the new event system in rv32emu, by
invoking system call poll_event to accept input specific events, we can
now move the character and control the menu with the keyboard, adjust
the view angle with the mouse in relative mode and use the mouse to
control weapon.
@jserv jserv merged commit a4d2661 into sysprog21:rv32emu Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants